<template>
    <div id="app">
        <router-view />
    </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
    computed: {
        ...mapState({
            theme: state => state.settings.theme
        })
    },
    created() {
        this.toggleTheme()
    },
    methods: {
        // 修改皮肤
        toggleTheme() {
            window.document.documentElement.setAttribute(
                'data-theme',
                this.theme
            )
        }
    }
}
</script>
<style lang="scss">
@import '~@/assets/styles/model/public';
</style>
